<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<jsp:include page="head.jsp" />

<jsp:include page="nav.jsp" />


<body class="page-body loaded" style="">
 
             <div class="page-title">
          <div class="title-env">
         
            <h1 class="title">账号列表</h1>
            <p class="description">此处可以管理维护所有用户帐号</p>
          </div>
            <div class="breadcrumb-env">
            
               <ol class="breadcrumb bc-1">
                 <li>
                  <a href="index.php"><i class="fa-home"></i>首页</a>
                </li>
                <li class="active">
                      <strong>账号列表</strong>
                  </li>
              </ol>
                  
             </div>
           </div>



            <div class="row">
                <div class="col-sm-12">
                    
                  <div class="panel panel-default">
                    <div class="panel-heading">
                      <h3 class="panel-title">平台共有 ${sessionScope.count } 个账号</h3>
                      
                      <div class="panel-options">
                        <a href="#/qqlist.php?page=1#">
                          <i class="linecons-cog"></i>
                        </a>
             
                      </div>
                    </div>
                    <div class="panel-body">
                <!--  -->
                      <form action="${pageContext.request.contextPath }/findUserServlet" method="get" role="form" class="form-inline">
                      <a href="${pageContext.request.contextPath }/management/admin/addzh.jsp" class="btn btn-info">添加账号</a>
                 <!--   <a href="#" class="btn btn-blue">导出所有账号数据</a>-->    
                        
                        <div class="form-group pull-right">
                        <div class="form-group">
                          <input type="text" class="form-control" size="25" name="kw" placeholder="帐号">
                        </div>

                        <div class="form-group">
                            <button type="submit" class="btn btn-secondary btn-single" onclick="">查询</button>
                        </div>
                        
                        </div>
                        
                      </form>
                <p align="center" style="color:red;">${requestScope.Msg }</p>
                      <div class="table-responsive">
                      
                                  <table cellspacing="0" class="table table-small-font table-bordered table-striped">
                                    <!-- 表头 -->
                                      <thead align="center">
                                          <tr align="center">
                                            
                                            <th align="center">账号</th>
                                            <th>密码</th>
                                            <th >注册时间</th>
                                            <th>到期时间</th>
                                            <th >剩余流量</th>
                                            <th>总流量</th>
                                            <th>状态</th>
                                            <th>备注</th>                                  
                                            <th>操作</th>
                                          </tr>
                                      </thead>
                                      <!-- 账号信息 -->
                                     <p align="center" style="color:red;">${requestScope.removeUsername}</p>
                                       <p align="center" style="color:green;">${requestScope.finduser }</p>
                                      <tbody>
                   <!-- cforeach遍历list -->                   
                                       <c:forEach items="${requestScope.list }" var="i">
                                   
                                      <tr>
                                        <td>${i.username }</td>
                                        <td>${i.password }</td>
                                        <td>${i.starttime }</td>
                                        <td>${i.endtime }</td>
                                        <td>${i.syll }MB</td>
                                        <td>${i.maxll }MB</td>
                                        <td>${i.status }</td>                                  
                                        <td>${i.bz }</td>
                                        <td  align="center"><a class="btn btn-xs btn-success" href="${pageContext.request.contextPath }/management/admin/setzh.jsp?username=${i.username}&password=${i.password }&maxll=${i.maxll}&endtime=${i.endtime}&bz=${i.bz}">配置</a>&nbsp;
                                        <a href="javascript:if(confirm('你确定要删除 ${i.username } 这个账号吗？该操作不可撤回！')){window.location.href='${pageContext.request.contextPath }/removeUserServelt?username=${i.username }'}" 
                                            class="btn btn-xs btn-danger">删除</a></td>
                                        </tr>
                                         </c:forEach>                                   
                                  </tbody>
                                  </table>
                      </div>
                      <div id="an11" align="center" style="display:'block'">
                         <ul  class="pagination pagination-sm" >
                            <li>
 <a href="${pageContext.request.contextPath }/zhListServlet?page=${requestScope.pageCount-1}&nowPage=${requestScope.pageCount}">上一页</a>
                            </li>
                            <li>&nbsp;</li>
                            <li>
 <a href="${pageContext.request.contextPath }/zhListServlet?page=${requestScope.pageCount+1}&nowPage=${requestScope.pageCount}">下一页</a>
                            </li>
                         </ul>                         
                    </div>
                  
                  </div>
                    
                </div>

            </div>

</div></body></html>

<jsp:include page="copy.jsp" />
